$def with (comments,commcount,pages)
<html>
	<head>
		<title>web.py guestbook on GAE</title>
		<link rel="stylesheet" href="./static/base.css" media="all"/>
		<!-- jQuery -->
		<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
		<!-- markItUp! -->
		<script type="text/javascript" src="/static/markitup/jquery.markitup.js"></script>
		<!-- markItUp! toolbar settings -->
		<script type="text/javascript" src="/static/markitup/sets/html/set.js"></script>
		<!-- markItUp! skin -->
		<link rel="stylesheet" type="text/css" href="/static/markitup/skins/markitup/style.css" />
		<!--  markItUp! toolbar skin -->
		<link rel="stylesheet" type="text/css" href="/static/markitup/sets/html/style.css" />
	</head>
	<body>
		<script language="javascript">
		
		$$(document).ready(function()    {
        $$('#markItUp').markItUp(mySettings);
        $$('.add').click(function() {
                $$.markItUp( {   openWith:'<opening tag>',
                                                closeWith:'<\/closing tag>',
                                                placeHolder:"New content"
                                        }
                                );
                return false;
        });
        $$('.toggle').click(function() {
                if ($$("#markItUp.markItUpEditor").length === 1) {
                        $$("#markItUp").markItUpRemove();
                        $$("span", this).text("get markItUp! back");
                } else {
                        $$('#markItUp').markItUp(mySettings);
                        $$("span", this).text("remove markItUp!");
                }
                return false;
        });
});
		</script>
		<form method="post" action="/guestbook/">
			<p>name:<input type="text" name="author" /><br />
				detail:<textarea id="markItUp" name="content" cols="60" rows="10"></textarea>
				<br/>
				<input type="submit" value="Comments" /></p>
		</form>
		<div align="left">
			total $commcount:
			$for page in range(1,pages+1):
				<a href="/?page=$page">$page</a>
		</div>
		<ul>	
		$if comments:
			<div class="reply-doc">	
				$for comment in comments:
					<div class="bg-img-green">
						[$comment.date.strftime("%Y-%m-%d %H:%M:%S")]      $comment.author:
					</div>
					<p>
					$:comment.content
					</p>
			</div>	
		$else:
			<em>no data</em>
	</body>

</html>
